<HTML>
<HEAD>
<link rel=stylesheet type="text/css" href="styles.css">
<TITLE>Simkin Globals</TITLE>
</HEAD>
<BODY>

<H1>
Simkin Globals</H1>
<hr>

All Simkin objects support certain functions connected with variables, please see
the <a href=DataTypes.html>data types page</a> for more information.
<p>
Simkin currently comes with a single global object - <b>Interpreter</b>, which represents the Simkin
language engine.
<p>
This object supports the following field:
<p>
tracing (boolean)	-	set this to <b>true</b>, and a trace of the methods called will be printed out
<p>
For example:
<pre>
Interpreter.tracing=true;
</pre>
switches tracing on, while this:
<pre>
Interpreter.tracing=false;
</pre>
switches tracing off.
<h2>Defining Globals</h2>
Each instance of the Simkin interpreter has its own set of global variables.
<p>
To add an object to the list of global variables, you should use the <b>addGlobalVariable</b> function provided in the Interpreter.
<p>
You can also remove an object from the list using the <b>removeGlobalVariable</b> function.
<p>In both cases you need to make a call to the Interpreter in the underlying C++ or Java code.
<p>For example in C++:
<pre>
MyGlobal * object=new MyGlobalObject();
skInterpeter interp;
interp.addGlobalVariable("MyGlobal",object);
</pre>
or in Java:
<pre>
MyGlobal object=new MyGlobalObject();
Interpeter interp=new Interpreter;
interp.addGlobalVariable("MyGlobal",object);
</pre>

</BODY>
</HTML>
